package dao;

import java.util.ArrayList;
import java.util.List;

import vo.Saleorder;

/**
 * @author bohan
 * @create 2017年5月6日
 */
public class SaleDaoImpl extends BaseDaoImpl<Saleorder> implements SaleDao{
	public Saleorder getOrderByNo(String no) {
		String hql = "from Saleorder where saleOrderNo='"+no+"'";
		List<Saleorder> list = new ArrayList<Saleorder>();
		list = select(hql);
		return list.get(0);
	}
	
	/*public Saleorder getItem(Saleorder order){
		String sql = "select * from saleorderitem where saleOrderNo='"+order.getSaleOrderNo()+"'";
		List list = new ArrayList();
		list = selectBySql(sql);
		for(int i = 0;i<list.size();i++){
			order.getSaleorderitems().add(list.get(i));
		}
		return order;
	}*/

}
